#include <iostream>

#include "matrix.hpp"

int main(int, char*[])
{
  etl::vector<float, 3> t(1.0f, 2.0f, 3.0f);

  std::cout << t(0) << " " << t(1) << " " << t(2) << std::endl;

  t = -t;

  std::cout << t(0) << " " << t(1) << " " << t(2) << std::endl;

  etl::vector<float, 3> u(1.0f);

  std::cout << u(0) << " " << u(1) << " " << u(2) << std::endl;

  t -= u;

  std::cout << t(0) << " " << t(1) << " " << t(2) << std::endl;

  etl::vector<float, 3> v(t + u);

  std::cout << v(0) << " " << v(1) << " " << v(2) << std::endl;

  etl::matrix<float, 3, 3> m(.0f);

  std::cout << m(2, 2) << std::endl;

  m = etl::identity<etl::matrix<float, 3, 3> >();

  std::cout << m(1, 0) << " " << m(1, 1) << " " << m(1, 2) << std::endl;

  etl::matrix<float, 3, 3> n(5.0f);

  std::cout << n(0, 0) << " " << n(0, 1) << " " << n(0, 2) << std::endl;

  etl::matrix<float, 3, 3> o(m * n);

  std::cout << o(0, 0) << " " << o(0, 1) << " " << o(0, 2) << std::endl;

  etl::matrix<float, 2, 2> m2;
  m2 = { 1.0f, 2.0f, 3.0f, 6.0f };
  etl::matrix<float, 2, 2> n2;
  n2 = { -2.0f, -2.0f, 1.0f, 1.0f };

  etl::matrix<float, 2, 2> o2(m2 * n2);

  std::cout << m2(0, 0) << " " << m2(0, 1) << " "
    << m2(1, 0) << " " << m2(1, 1) << std::endl;

  std::cout << n2(0, 0) << " " << n2(0, 1) << " "
    << n2(1, 0) << " " << n2(1, 1) << std::endl;

  std::cout << o2(0, 0) << " " << o2(0, 1) << " "
    << o2(1, 0) << " " << o2(1, 1) << std::endl;

  return 0;
}
